class_name TimeCheck


var _interval:int = 0
var _nextTick:int = 0
func _init(interval:int)->void:
	print("Set Time Check "+ String.num( interval))
	_interval = interval
	
func check_and_set(curTick:int):
	if curTick >= _nextTick :
		_nextTick = curTick + _interval;
		return true;
	else:
		return false;

func set_next_from_now(waitTick:int):
	var curTick = Time.get_ticks_msec();
	_nextTick = curTick + waitTick;
